home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 45
/
Aminet 45 (2001)(GTI - Schatztruhe)[!][Oct 2001].iso
/
Aminet
/
game
/
role
/
ldmud-3.2-bin.lha
/
mud
/
doc
/
master
/
dangling_lfun_closure
< prev
next >
Wrap
Text File
|
2001-04-06
|
1KB
|
27 lines
SYNOPSIS
void dangling_lfun_closure()
DESCRIPTION
Handle a dangling lfun-closure.
This is called when the gamedriver executes a closure using a
vanished lfun. A proper handling is to raise a runtime error.
Technical:
Upon replacing programs (see efun replace_program()), any
existing lambda closures of the object are adjusted to the
new environment. If a closure uses a lfun which vanished in
the replacement process, the reference to this lfun is
replaced by a reference to this function. The error will
then occur when the execution of the adjusted lambda reaches
the point of the lfun reference. There are two reasons for
the delayed handling. First is that the program replacement
and with it the closure adjustment happens at the end of a
backend cycle, outside of any execution thread: noone would
see the error at this time. Second, smart closures might
know/recognize the program replacement and skip the call to
the vanished lfun.
SEE ALSO
closures(LPC)